﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace ExamSharedClasses
{
    /// <summary>
    /// (k) UserGroup stellt die Gruppenzugehörigkeit dar. Es gibt Schüler/Teilnehmer,
    /// Dozenten/Trainer und Administratoren.
    /// </summary>
    [Serializable()]
    public class UserGroup
    {
        public const string TABLENAME = "user_group";
        public const string GROUP_ID = "group_id";
        public const string GROUP_NAME = "group_name";

        public int GroupId { get; set; }
        public string GroupName { get; set; }

        public UserGroup() : this (-1, "") { }
        public UserGroup(int groupId, string groupName)
        {
            GroupId = groupId;
            GroupName = groupName;
        }


        public override string ToString() {
            StringBuilder sb = new StringBuilder( "UserGroup: " );
            sb.Append( '\t' + GroupId.ToString() + ", " );
            if ( GroupName != null )
                sb.Append( '\t' + GroupName.ToString() + '\n' );
            return sb.ToString();
        }

    }

      
}
